package 力扣日常刷题.木22一月.第05天0112;

/**
 * @author 帅小伙
 * @date 2022/1/12
 * @description
 */
public class Demo05每日一题递增的三元子序列 {

    public boolean increasingTriplet(int[] nums) {
        int a = Integer.MAX_VALUE;
        int b = Integer.MAX_VALUE;

        for (int num : nums) {
            if(num <= a){
                a = num;
            }else if(num <= b){
                b = num;
            }else{
                return true;
            }
        }
        return false;
    }
}
